import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect:'/test'
    },
    {
        path: '/home',
        name: 'home',
        component: () =>
            import ('../views/Home.vue')
    },
    {
        path: '/hometwo',
        name: 'hometwo',
        component: () =>
            import ('../views/HomeTwo.vue')
    },
    {
        path: '/test',
        name: 'test',
        component: () =>
            import ('../views/Test.vue')
    },
    {
        path: "/result",
        name: "result",
        redirect:"/result/stature",
        component: () =>
          import("../views/Result.vue"),
        children: [
          {
            path: "/result/stature",
            name: "stature",
            component: () =>
              import("../views/Stature.vue")
          },
          {
            path: "/result/weight",
            name: "weight",
            component: () =>
              import("../views/Weight.vue")
          }
        ]
      }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router